<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员中心</title>
<link href="__PUBLIC__/home/css/style.css" type="text/css" rel="stylesheet" />
<script src="__PUBLIC__/home/js/jquery-1.7.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/home/js/common.js"  type="text/javascript"></script>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
<script src="__PUBLIC__/home/js/message_verify.js"></script>
</head>
<body class="index">

<div class="w1200">
	<div class="position"><a href="#">首页</a> > <a href="#">会员中心</a> > <a href="#">个人资料</a></div>
    
    <div class="m_d">
    	<div class="left">
        	<dl><dt>账户管理</dt>
            <dd>
            	<a href="{$member}" id="per_info">修改密码</a>
                <a href="#" class="on" id="re_pass">添加地址</a>
                <a href="{$orderall}" id="allorder">订单管理</a>
                <a href="#">绑定会员卡</a>
                <a href="#">绑定银行卡</a>
                <a href="#">升级管理</a>
                <a href="#">账单列表</a>
                <a href="#">提现申请</a>
            </dd>
            </dl>
            <!-- <dl><dt class="dt02">排队管理</dt>
            <dd>
            	<a href="#">参与排队</a>
                <a href="#">全国排队详情</a>
                <a href="#">23通道排队列表</a>
                <a href="#">12通道排队列表</a>
                <a href="#">6通道排队列表</a>
            </dd>
            </dl> -->
        </div>
        <div class="right">
        	<dl class="dl01">
            	<dt><img src="__PUBLIC__/home/images/ico04.jpg"/></dt>
                <include file="up_headimg"/>
            </dl>
            <dl class="dl02 personinfo">
                <dt>
                    <span>已添加地址</span>
                </dt>
                <div>&nbsp;</div>
                <php>$i=1;</php>
                <php>foreach($addresses as $key => $value){</php>
                    <php>if($i<=5){</php>
                        <ul class="Address_info">
                            <div class="address_title"><a href="#" class="modify " title="修改信息"></a>第<php>echo $i;</php>条地址信息 <a href="javascript:over('0')" class="delete "><i class="iconfont icon-close"></i></a></div>
                            <li>收件人：<php>echo $value['username'];</php></li>
                            <li>收件地址：<php>echo $value['address'];</php></li>
                            <li>联系方式：<php>echo $value['phone'];</php></li>
                            <li>邮编：<php>echo $value['postcode'];</php></li>
                        </ul>  
                        <div><a href="{$del}?id=<?php echo $value['id']; ?>"><button class="return_del" style="">删除</button></a></div>
                        <div>&nbsp;</div>  
                        <div>&nbsp;</div>  
                        <div>&nbsp;</div>  
                <php>}$i++;}</php>
            </dl>
            <dl class="dl02 personinfo">
            	<dt>
                	<span>添加地址</span>
                </dt>
                <dd>
                    <form action="{$addressact}" method="post" id="commentForm">
                        <!-- <div class="item"><span><font>*</font>用户真实姓名：</span><input type="tex" class="txt"/></div>
                        <div class="item"><span><font>*</font>用户身份证号码：</span><input type="tex" class="txt"/></div>
                        <div class="item"><span><font>*</font>性别：</span><input type="radio" value="" name="sex"/> 男&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" value="" name="sex"/> 女</div> -->
                        <!-- <div class="item"><span style="float:left"><font>*</font>开户行：</span>
                        <div class="xlc"><input name="aaa" class="txt-xl li01" value="储蓄卡|213213"/><span>更换银行 V</span>
                              <ul>
                                  <li class="li01">储蓄卡|111111</li>
                                  <li class="li02">储蓄卡|222222</li>
                                  <li class="li03">储蓄卡|213213</li>
                              </ul>
                          </div>
                          <div class="clear"></div>
                         </div>
                         <div class="item"><span><font>*</font>开户人姓名：</span><input type="tex" class="txt"/></div>
                         <div class="item"><span><font>*</font>银行卡号：</span><input type="tex" class="txt"/></div> -->
                        
                         <!-- <div class="item"><span><font>*</font>联系地址：</span><select><option value="广东省">广东省</option></select><select><option value="深圳市">深圳市</option></select><input type="tex" class="txt"/></div> -->
                        <div>
                            <table>
                                <tr>
                                    <td><span><font>*</font>收货地址：</span></td>
                                    <td>
                                        <span><font>&nbsp;&nbsp;&nbsp;</font><select class="changeAct" id="level1" level="1" name="add1" min="0" style="width: 210px;">
                                            <option value="0">请选择</option>
                                            <volist name="states" id="state">
                                                <option value="{$state.id}">{$state.name}</option>
                                            </volist>
                                        </select></span>
                                    </td>
                                    <td>
                                        <span><font>&nbsp;&nbsp;&nbsp;</font><select class="changeAct" id="level2" level="2" name="add2"  min="0" style="width: 210px;">
                                            <option value="0">请选择</option>
                                            <volist name="areas" id="area">
                                                <option value="{$area.id}">{$area.name}</option>
                                            </volist>
                                        </select></span>
                                    </td>
                                    <td>
                                        <span><font>&nbsp;&nbsp;&nbsp;</font><select class="changeAct" id="level3" level="3" name="add3"  min="0" style="width: 210px;">
                                            <option value="0">请选择</option>
                                            <volist name="locals" id="local">
                                                <option value="{$local.id}">{$local.name}</option>
                                            </volist>
                                        </select></span>
                                    </td>
                                </tr> 
                                <tr><td colspan="4">&nbsp;</td></tr> 
                                <tr>
                                    <td><font>*</font>详细地址：</td>
                                    <td colspan="3">
                                        <textarea name="add4" style="height: 50px;"  class="address" required="true" ></textarea>
                                    </td>
                                </tr>
                                <tr><td colspan="4">&nbsp;</td></tr> 
                                <tr>
                                    <td class="label_name"><font>*</font>收件人姓名</td><td><input name="username" type="text"  class="addtex"  required="true"/><i>（必填）</i></td>
                                    <td class="label_name">电子邮箱</td><td><input name="email" type="text"  class="addtex"/><i>（选填）</i></td>
                                </tr>
                                <tr><td colspan="4">&nbsp;</td></tr> 
                                <tr>
                                    <td class="label_name"><font>*</font>邮&nbsp;&nbsp;编</td><td><input name="postcode" type="text"  class="addtex" required="true" rangelength="5,7"/><i>（必填）</i></td>
                                    <td class="label_name">性&nbsp;&nbsp;别</td><td> 
                                    <label class="sex"> <input type="radio" name="gender" value="1" id="RadioGroup1_0"  class="select"/><span>男</span></label>
                                    <label class="sex"><input type="radio" name="gender" value="2" id="RadioGroup1_1" class="select"/><span>女</span></label><i>（选填）</i> </td>
                                </tr>
                                <tr><td colspan="4">&nbsp;</td></tr> 
                                <tr>
                                    <td class="label_name"><font>*</font>手&nbsp;&nbsp;机</td><td><input name="phone" type="text"  class="addtex" length="11" required="true"  rangelength="10,12"/><i>（必填）</i></td>
                                     <td class="label_name">固定电话</td><td><input name="tel" type="text"  class="addtex"/><i>（选填）</i></td>
                                </tr>
                                <tr><td colspan="4">&nbsp;</td></tr> 
                                <tr><td class="label_name"></td><td></td><td class="label_name"></td><td></td>
                                </tr>             
                            </table>
                                 <div class="address_Note"><span>注：</span>只能添加5个收货地址信息。请勿用假名填写地址，如造成损失由收货人自己承担。</div>
                                 <div class="item"><input name="1" type="submit" value="添加地址" class="sub" /></div>
                        </div>
                    </form>
                	
                </dd>
            </dl>
        </div>
        <div class="clear"></div>
    </div>
</div>
<script>
    // $.validator.setDefaults({
    //     submitHandler: function() {
    //       alert("注册!");
    //     }
    // });
    $().ready(function() {
        $("#commentForm").validate();
    });
    // $('#cap').on('blur',function(){
    //     var cap=$('#cap').text();
    //     session.setAttribute("cap",cap);
    // });
</script>
<script type="text/javascript">
    $('.changeAct').on('change',function(){
        $.ajax({
            type:'post',
            data:'pid='+$(this).val()+'&level='+$(this).attr('level'),
            url:'{$region}',
            dataType:'json',
            success:function(data){
                if (data.status=="OK") {
                    var html='<option value="0">请选择</option>';
                    for (var i = 0; i < data.area.length; i++) {
                        html=html+'<option value="'+data.area[i].id+'">'+data.area[i].name+'</option>';
                    }
                    $level=parseInt(data.level)+1;
                    $('#level'+$level).html(html);
                }
            }
        });
    });
</script>
<!-- <script type="text/javascript">
    $(function(){
        $("#per_info").on('click',function(){
            $('.right dl').css('display','none');
            $('.personinfo').css('display','block');
            $('.dl01').css('display','block');
        });
        $("#re_pass").on('click',function(){
            $('.right dl').css('display','none');
            $('.reviewpassword').css('display','block');
            $('.dl01').css('display','block');
        });
        $("#allorder").on('click',function(){
            $('.right dl').css('display','none');
            $('.reviewpassword').css('display','block');
            $('.dl01').css('display','block');
        });
    });
</script> -->
<!--footer-->


</body>
</html>
